package com.sctvcloud.longchang.ui.adapter.holder;

import android.content.Context;
import android.view.View;

import com.ruihang.generalibrary.ui.adapter.BaseHolderAbsAdapter;
import com.ruihang.generalibrary.ui.adapter.holder.BaseRecylerHolder;
import com.ruihang.generalibrary.ui.widget.CustomCheckBox;
import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.sctvcloud.longchang.R;
import com.sctvcloud.longchang.beans.FProgram;
import com.sctvcloud.longchang.ui.util.IListShowData;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/7/13 0013.
 */

public class ProgramBackHolder extends BaseRecylerHolder<FProgram> implements View.OnClickListener {

    @BindView(R.id.item_look_back_title)
    protected CustomFontTextView item_look_back_title;
    private FProgram t;
    private OnProgramTitleClickListener listener;

    public ProgramBackHolder(Context context, View itemView, OnProgramTitleClickListener listener) {
        super(context, itemView);
        this.listener = listener;
        itemView.setOnClickListener(this);
    }

    @Override
    public void setData(FProgram t) {
        this.t = t;
        item_look_back_title.setText(t.getProgrammeName());
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void onClick(View v) {
        if (null != listener) {
            listener.OnProgramTitleClick(t);
        }
    }

    public interface OnProgramTitleClickListener {
        void OnProgramTitleClick(FProgram fp);
    }
}
